Skip to content
This repository was archived by the owner on Oct 20, 2026. It is now read-only.

Fix variant selector to allow switching between valid combinations - #1495

Closed
NemisysT wants to merge 1 commit into
vercel:mainfrom
NemisysT:fix/variant-selector-combination-issue-1457
Closed

NemisysT wants to merge 1 commit into
vercel:mainfrom
NemisysT:fix/variant-selector-combination-issue-1457

Conversation

@NemisysT

@NemisysT NemisysT commented Oct 7, 2025

Copy link
Copy Markdown

Fixes #1457

The variant selector was preventing users from switching between valid product combinations. The issue was in the isAvailableForSale logic which checked if ALL current options plus the new selection formed a valid combination, creating impossible scenarios (e.g., checking for BLACK+L+WHITE when clicking WHITE from BLACK+L).

The fix changes the availability check to only verify if there exists at least one valid variant with the selected option value, regardless of other currently selected options. This allows users to freely switch between any valid combinations.

Example: Users can now switch from BLACK+L to WHITE+M without having to first change to an intermediate size.

Fixes vercel#1457

The variant selector was preventing users from switching between valid product combinations. The issue was in the isAvailableForSale logic which checked if ALL current options plus the new selection formed a valid combination, creating impossible scenarios (e.g., checking for BLACK+L+WHITE when clicking WHITE from BLACK+L).

The fix changes the availability check to only verify if there exists at least one valid variant with the selected option value, regardless of other currently selected options. This allows users to freely switch between any valid combinations.

Example: Users can now switch from BLACK+L to WHITE+M without having to first change to an intermediate size.
@vercel

vercel Bot commented Oct 7, 2025

Copy link
Copy Markdown
Contributor

@NemisysT is attempting to deploy a commit to the Vercel Solutions Team on Vercel.

A member of the Team first needs to authorize it.

@willsather willsather closed this Oct 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Product page's variant selector prevents switching to another valid combination

2 participants